]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Don't use global.log*
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 10 May 2012 01:37:42 +0000 (22:37 -0300)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 18 May 2012 18:09:00 +0000 (14:09 -0400)
These are "deprecated", and are just references to the gjs logging functoins

https://bugzilla.gnome.org/show_bug.cgi?id=675790

js/extensionPrefs/main.js
js/misc/extensionUtils.js
js/ui/extensionSystem.js
js/ui/main.js
js/ui/search.js

index 921bfe6b270b9b4b5824b8bcf776a6d06ea4cb1f..59bf6cb5353f5d1388d4c8ecb8ff749026c969e2 100644 (file)
@@ -210,7 +210,7 @@ const Application = new Lang.Class({
             try {
                 extension = ExtensionUtils.createExtensionObject(uuid, dir, type);
             } catch(e) {
-                global.logError('' + e);
+                logError(e, 'Could not create extensions object');
                 return;
             }
 
@@ -257,7 +257,7 @@ function initEnvironment() {
         },
 
         logError: function(s) {
-            global.log('ERROR: ' + s);
+            log('ERROR: ' + s);
         },
 
         userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell'])
index 7dcf166de7a937ee33a3f6d91e080747b076c3c7..82ded012528868252f8e3549616897d2c0011d1a 100644 (file)
@@ -120,7 +120,7 @@ function createExtensionObject(uuid, dir, type) {
 
     // Encourage people to add this
     if (!meta.url) {
-        global.log('Warning: Missing "url" property in metadata.json');
+        log('Warning: Missing "url" property in %s/metadata.json'.format(uuid));
     }
 
     if (uuid != meta.uuid) {
@@ -157,7 +157,7 @@ function init() {
         if (!userExtensionsDir.query_exists(null))
             userExtensionsDir.make_directory_with_parents(null);
     } catch (e) {
-        global.logError('' + e);
+        logError(e, 'Could not create extensions directory');
     }
 }
 
@@ -167,7 +167,7 @@ function scanExtensionsInDirectory(callback, dir, type) {
     try {
         fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
     } catch(e) {
-        global.logError('' + e);
+        logError(e, 'Could not enumerate extensions directory');
         return;
     }
 
index 2fa30db30aae1b5db51591ff096a1783c37fe572..fe092d2a0d29b4a51e31aa65084b1a8e5feeffee 100644 (file)
@@ -237,7 +237,7 @@ function logExtensionError(uuid, message, state) {
         extension.errors = [];
 
     extension.errors.push(message);
-    global.logError('Extension "%s" had error: %s'.format(uuid, message));
+    log('Extension "%s" had error: %s'.format(uuid, message));
     state = state || ExtensionState.ERROR;
     _signals.emit('extension-state-changed', { uuid: uuid,
                                                error: message,
@@ -249,7 +249,7 @@ function loadExtension(dir, type, enabled) {
     let extension;
 
     if (ExtensionUtils.extensions[uuid] != undefined) {
-        global.logError('Extension "%s" is already loaded'.format(uuid));
+        log('Extension "%s" is already loaded'.format(uuid));
         return;
     }
 
index f1795946f6cc65016c836d8177cd6e63e012061b..f7f46c25699066019f6ff7a1f70ab72054b2b1ce 100644 (file)
@@ -875,7 +875,8 @@ function initializeDeferredWork(actor, callback, props) {
 function queueDeferredWork(workId) {
     let data = _deferredWorkData[workId];
     if (!data) {
-        global.logError('invalid work id ', workId);
+        let message = 'Invalid work id %d'.format(workId);
+        logError(new Error(message), message);
         return;
     }
     if (_deferredWorkQueue.indexOf(workId) < 0)
index c6fc02e9a148284f8c4f25527c74e37c7abb19eb..86255fa1f962eea2067ce3168b953fb4a041e1ff 100644 (file)
@@ -354,7 +354,7 @@ const SearchSystem = new Lang.Class({
                     results.push([provider, []]);
                     provider.getSubsearchResultSet(previousResults, terms);
                 } catch (error) {
-                    global.log ('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
+                    log('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
                 }
             }
         } else {
@@ -364,7 +364,7 @@ const SearchSystem = new Lang.Class({
                     results.push([provider, []]);
                     provider.getInitialResultSet(terms);
                 } catch (error) {
-                    global.log ('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
+                    log('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
                 }
             }
         }